package com.project.lk.nurseapp.db;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.project.lk.nurseapp.db.RemindBean;
import com.project.lk.nurseapp.db.UserDaoBean;

import com.project.lk.nurseapp.db.RemindBeanDao;
import com.project.lk.nurseapp.db.UserDaoBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig remindBeanDaoConfig;
    private final DaoConfig userDaoBeanDaoConfig;

    private final RemindBeanDao remindBeanDao;
    private final UserDaoBeanDao userDaoBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        remindBeanDaoConfig = daoConfigMap.get(RemindBeanDao.class).clone();
        remindBeanDaoConfig.initIdentityScope(type);

        userDaoBeanDaoConfig = daoConfigMap.get(UserDaoBeanDao.class).clone();
        userDaoBeanDaoConfig.initIdentityScope(type);

        remindBeanDao = new RemindBeanDao(remindBeanDaoConfig, this);
        userDaoBeanDao = new UserDaoBeanDao(userDaoBeanDaoConfig, this);

        registerDao(RemindBean.class, remindBeanDao);
        registerDao(UserDaoBean.class, userDaoBeanDao);
    }
    
    public void clear() {
        remindBeanDaoConfig.clearIdentityScope();
        userDaoBeanDaoConfig.clearIdentityScope();
    }

    public RemindBeanDao getRemindBeanDao() {
        return remindBeanDao;
    }

    public UserDaoBeanDao getUserDaoBeanDao() {
        return userDaoBeanDao;
    }

}
